<html>
<head><meta charset="utf-8"><title>always error on query cycles · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html">always error on query cycles</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="156787321"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156787321" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156787321">(Jan 24 2019 at 16:51)</a>:</h4>
<p>I want to change the query system so that a query cycle always result in an error. Currently the only exception is MIR inlining. It tries to get an optimized MIR and doesn't inline if a cycle occurred. This isn't really ideal for a number of reasons and I'd like to change it to use the unoptimized MIR for now. Long term I'd expect us to have a single query which handles inlining + MIR optimizations on the entire crate which does it's own cycle checking. cc <span class="user-mention" data-user-id="125250">@Wesley Wiser</span></p>



<a name="156787457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156787457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156787457">(Jan 24 2019 at 16:53)</a>:</h4>
<p>MIR inlining is totally unstable and <span class="user-mention" data-user-id="116009">@nikomatsakis</span> wants to change it compute an SCC graph anyway.</p>



<a name="156787468"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156787468" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156787468">(Jan 24 2019 at 16:53)</a>:</h4>
<blockquote>
<p>I'd like to change it to use the unoptimized MIR for now</p>
</blockquote>
<p>I'd say go for it!</p>



<a name="156788711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156788711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hanna Kruppe <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156788711">(Jan 24 2019 at 17:11)</a>:</h4>
<p>for reference <a href="https://github.com/rust-lang/rust/issues/43542" target="_blank" title="https://github.com/rust-lang/rust/issues/43542">https://github.com/rust-lang/rust/issues/43542</a></p>



<a name="156789292"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156789292" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156789292">(Jan 24 2019 at 17:18)</a>:</h4>
<p>I am strongly in favor of this, <span class="user-mention" data-user-id="116466">@Zoxc</span></p>



<a name="156789307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156789307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156789307">(Jan 24 2019 at 17:18)</a>:</h4>
<p>it has been the plan for some time, just nobody got around to it basically</p>



<a name="156789324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156789324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156789324">(Jan 24 2019 at 17:19)</a>:</h4>
<p>I'll make a PR then</p>



<a name="156789332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156789332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156789332">(Jan 24 2019 at 17:19)</a>:</h4>
<p>I think your sol'n (unopt mir) is ok for now</p>



<a name="156789343"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156789343" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156789343">(Jan 24 2019 at 17:19)</a>:</h4>
<p>as <span class="user-mention" data-user-id="125250">@Wesley Wiser</span> said I had a vague plan to compute SCCs etc but... wev</p>



<a name="156837419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156837419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> mw <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156837419">(Jan 25 2019 at 08:31)</a>:</h4>
<p>+1 from me</p>



<a name="156919358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/always%20error%20on%20query%20cycles/near/156919358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Zoxc <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/always.20error.20on.20query.20cycles.html#156919358">(Jan 26 2019 at 10:21)</a>:</h4>
<p>I forgot that we don't have an unoptimized MIR. Would inlining just from other crates suffice? We can also allow functions earlier in the crate in non-incremental mode (which would be useful for testing)</p>
<p>cc <span class="user-mention" data-user-id="125250">@Wesley Wiser</span> <span class="user-mention" data-user-id="116009">@nikomatsakis</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>